﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Common;

namespace Ex10
{
    /// <summary>
    /// Defeating Reevaluation
    /// </summary>
    class Program
    {
        static void Main(string[] args)
        {
            var numbers = new List<int>() { 1, 2 };

            List<int> timesTen = numbers
              .Select(n => n * 10)
              .ToList();      // Executes immediately into a List<int>

            numbers.Clear();
            timesTen.Count.Dump("Still two elements present");
            Console.ReadKey();
        }
    }
}
